package com.education.model.dto;

import lombok.Data;
import org.springframework.web.multipart.MultipartFile;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.util.List;

@Data
public class EmailRequest {

    @NotBlank
    private String subject;

    @NotBlank
    private String content;

    private String email;

    private Boolean isHtml = false;

    private List<AttachmentRequest> attachments;

    @Data
    public static class AttachmentRequest {
        @NotBlank
        private String filename;

        @NotNull
        private MultipartFile file;
    }
}
